package com.bs.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * 商品类
 *
 * @author 陈晓琪
 * @since 2025-5-7 20:09:43
 */
@Data
@NoArgsConstructor
@TableName("bs_item")
public class Item {

    /**
     * 商品ID
     */
    @TableId(type = IdType.ASSIGN_UUID)
    @ApiModelProperty("主键（商品库存id）")
    private String id;

    @ApiModelProperty("名称")
    private String name;

    @ApiModelProperty("价格")
    private double price;

    @ApiModelProperty("类型")
    private String type;

    @ApiModelProperty("图片地址")
    private String imageUrl;

    @ApiModelProperty(value = "商品数量", notes = "库存数量、订单数量")
    private Integer quantity;

    @ApiModelProperty("更新时间")
    private Date updateTime;
    @ApiModelProperty("创建时间")
    private Date createTime;

    public Item(String id, String name, double price, String type) {
        this.id = id;
        this.name = name;
        this.price = price;
        this.type = type;
    }
}